/*
 * @Author: xiaodong 565071984@qq.com
 * @Date: 2022-05-02 19:25:33
 * @LastEditors: xiaodong 565071984@qq.com
 * @LastEditTime: 2022-05-14 22:00:37
 * @FilePath: /小票/src/config/net.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/**
 * @description 导出默认网路配置
 **/
let isElement = true
const smallPacket = isElement ? 'http://cr2.liangzhidaxiang.com' : ''
const elementUI = 'vab-mock-server'
const network = {
  // 默认的接口地址 如果是开发环境和生产环境走vab-mock-server，当然你也可以选择自己配置成需要的接口地址
  baseURL:
    process.env.NODE_ENV === 'development'
      ? smallPacket || elementUI
      : smallPacket || elementUI,
  //配后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8
  contentType: 'application/json;charset=UTF-8',
  //消息框消失时间
  messageDuration: 3000,
  //最长请求时间
  requestTimeout: 5000,
  //操作正常code，支持String、Array、int多种类型
  successCode: [200, 0],
  //登录失效code
  invalidCode: 402,
  //无权限code
  noPermissionCode: 401,
}
module.exports = network
